document.getElementById("adminLoginButton").addEventListener("click",(event)=>{
    let adminID = document.getElementById("_easyui_textbox_input1").value
    let adminPWD = document.getElementById("_easyui_textbox_input2").value
    $.post("/common/adminSignIn",
    {
        "adminid":adminID,
        "password":adminPWD
    },(res)=>{
        if (res.code=='207') {
            alert(res.description)
            document.location="./admin_home.html"
        }else {
            alert(res.description)
        }
        },'json')
})
document.getElementById("staffIDLoginButton").addEventListener("click",(event)=>{
    let staffID = document.getElementById("_easyui_textbox_input3").value
    let staffPWD = document.getElementById("_easyui_textbox_input4").value
    $.post("/common/staffIDSignIn",
        {
            "staffid":staffID,
            "password":staffPWD
        },(res)=>{
        if (res.code=='207') {
            alert(res.description)
            document.location="./staff_home.html"
        }
        else {
            alert(res.description)
        }


        },'json')

})
document.getElementById("staffEmailButton").addEventListener("click",(event)=>{
    let staffEmail = document.getElementById("_easyui_textbox_input5").value
    let staffPWD = document.getElementById("_easyui_textbox_input6").value
    $.post("/common/staffEmailSignIn",
        {
            "staffemail":staffEmail,
            "password":staffPWD
        },(res)=>{
            alert(res.description)
            document.location="./staff_home.html"
        },'json')
})
document.getElementById("staffSignUpButton").addEventListener("click",(event)=>{
    let name = document.getElementById("_easyui_textbox_input7").value
    let email = document.getElementById("_easyui_textbox_input8").value
    let pwd = document.getElementById("_easyui_textbox_input10").value
    $.post("/common/staffSignUp",
        {
            "name":name,
            "email":email,
            "pwd":pwd
        },(res)=>{
            alert(res.description)
            document.location.reload()
        },'json')
})